package com.kayo.specimen.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Role implements Serializable {
    private String id;
    private String name;
    private Boolean isEnabled;
    private String description;
    private Date createTime;

    public Role() {
    }

    @Override
    public boolean equals(Object o) {
        if(!(o instanceof Role))
            return false;
        if (this.id .equals (((Role)o).id))
            return true;

        return false;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, isEnabled, description, createTime);
    }

    public Role(String name, Boolean isEnabled, String description, Date createTime) {
        this.name = name;
        this.isEnabled = isEnabled;
        this.description = description;
        this.createTime = createTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getEnabled() {
        return isEnabled;
    }

    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
